<%-- 
    Document   : admin
    Created on : Dec 13, 2011, 2:19:09 PM
    Author     : Randy
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>IEPM Login</title>
        <%@include file = "admin/global/admin_include.jsp" %>
        <script type="text/javascript">
            function processLogin(){
                $.ajax({
                    type: "POST",
                    url: "./LoginServlet",
                    data: "action=login"
                        + "&username=" + $('#username').val()
                        + "&password=" + $('#password').val(),
                    dataType: "json",
                    cache: false,
                    success: function(data){
                        if((data.type!='error')){
                            window.open('admin/index.jsp',"_self");
                        } else {
                            alertMsg(data);
                        }
                    }
                });
            }
        </script>
    </head>
    <body style="background:#EFEFEF;">
        <br/><br/><br/><br/><br/><br/>
        <div align="center">
            <div id="pp" class="easyui-panel" style="overflow:hidden; width:300px;padding:10px;background:#fafafa;">
                <table>
                    <tr>
                        <td colspan="2"><b>Please enter your login credentials below</b></td>
                    </tr>
                    <tr>
                        <td colspan="2"><br/></td>
                    </tr>
                    <tr>
                        <td>User Name: </td>
                        <td align="right"><input size="30" id="username" name="username" type="text" /></td>
                    </tr>
                    <tr>
                        <td>Password: </td>
                        <td align="right"><input size="30" id="password" name="password" type="password" /></td>
                    </tr>
                    <tr>
                        <td colspan="2" align="right"><input type="button" value="Login" onclick="processLogin()"/></td>
                    </tr>
                </table>
            </div>
        </div>
    </body>
</html>
